package com.erp.app.common.select.beans;

import java.sql.Connection;
import java.util.HashMap;

import com.erp.app.common.select.dao.SelectDAO;
import com.erp.app.common.select.dao.XlsDao;
import com.erp.app.common.xls.vo.XlsSqlVo;
import com.erp.framework.model.dao.ServiceLocator;
import com.erp.framework.model.delegate.SimpleSearchMaintStyleDelegate;
import com.erp.framework.util.logger.Logger;

public class XlsDelegate  extends SimpleSearchMaintStyleDelegate {
	
	public HashMap selectXlsMap(XlsSqlVo xvo) {
		HashMap re = new HashMap();
		Connection conn = null;
		try {
			conn = ServiceLocator.getInstance().getDSDBConnection();
			XlsDao dao = new XlsDao();
			re = dao.selectXlsMap(xvo, conn);
		}catch (Exception e) {
            Logger.logExceptions(this, e);
        } finally {
            try {
                if (conn != null)
                    conn.close();
            } catch (Exception e) {
                Logger.logExceptions(this, e);
            }
        }
		return re;
	}
	
	public HashMap selectXlsDtlMap(XlsSqlVo xvo) {
		HashMap re = new HashMap();
		Connection conn = null;
		try {
			conn = ServiceLocator.getInstance().getDSDBConnection();
			XlsDao dao = new XlsDao();
			re = dao.selectXlsDtlMap(xvo, conn);
		}catch (Exception e) {
            Logger.logExceptions(this, e);
        } finally {
            try {
                if (conn != null)
                    conn.close();
            } catch (Exception e) {
                Logger.logExceptions(this, e);
            }
        }
		return re;
	}
}
